package com.xbongbong.paas.pojo.linkdata.dto;

import com.xbongbong.paas.field.FieldAttrEntity;
import com.xbongbong.paas.pojo.linkdata.DataLinkagePoJo;
import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import com.xbongbong.paas.toolbox.wrap.QueryIgnore;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @author 吴峰
 * @date 2022/03/24 11:13
 */
@Getter
@Setter
@ToString
public class DataLinkageDTO extends BaseDTO {
    private static final long serialVersionUID = 9204422710579904753L;

    /**
     * 当前表单的表单id
     */
    @NotNull(message = "{dto.msg.common.formId.NotNull}")
    private Long formId;

    @NotNull(message = "{dto.msg.common.saasMark.NotNull}")
    private Integer saasMark;

    @NotNull(message = "{dto.msg.common.businessType.NotNull}")
    private Integer businessType;

    /**
     * 子表单的attr，如subform_1、subform_2
     */
    private String subFormAttr;

    /**
     * 预览字段列表
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private List<FieldAttrEntity> previewFieldList;


    @NotEmpty()
    private List<DataLinkagePoJo> linkDataList;

}
